<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-projectPageObject-add">
        <div class="form-group">
            <label class="col-sm-3 control-label">项目：</label>
            <div class="col-sm-8">
                <select id="projectId" name="projectId" style="width: 200px;" th:with="type=${projects}">
                    <option th:each="projects : ${type}" th:text="${projects.projectName}"
                            th:value="${projects.projectId}"
                            th:selected="${projects.projectId == defaultProjectId}"></option>
                </select>
			</div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">页面名称：</label>
            <div class="col-sm-8">
                <input id="pageName" name="pageName" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <input id="remark" name="remark" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">页面父菜单：</label>
            <div class="col-sm-8">
                <input id="pageParentMenu" name="pageParentMenu" class="form-control" type="text">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">页面菜单：</label>
            <div class="col-sm-8">
                <input id="pageMenu" name="pageMenu" class="form-control" type="text">
            </div>
        </div>
    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "testmanagmt/projectPageObject"
    $("#form-projectPageObject-add").validate({
        rules: {
            xxxx: {
                required: true,
            },
        }
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-projectPageObject-add').serialize());
        }
    }
</script>
</body>
</html>
